package com.fare.taluo.queue;

import com.dayatang.domain.InstanceFactory;
import com.fare.taluo.application.queue.IScheduleQueueApplication;
import com.fare.taluo.application.queue.QueueEmailMessageApplication;
import com.fare.taluo.queue.template.ScheduleQueueTemplate;
import com.fare.taluo.vo.queue.QueueEmailMessageVO;
/**
 * 邮件发送队列实现类
 * <p>threahpool-config.xml中配置名称
 * @author creator: xiangsf
 * @author modifior: xiangsf
 * @since 2012-12-20-上午8:53:11
 * @version v1.0
 */
public class ScheduleQueueEmailMessage extends ScheduleQueueTemplate<ScheduleQueueEmailMessage, QueueEmailMessageVO> {

	public static final String SCHEDULE_QUEUE_ID = "emailMessage";
	private QueueEmailMessageVO vo;

	public ScheduleQueueEmailMessage(){}
	
	public ScheduleQueueEmailMessage(QueueEmailMessageVO vo){
		this.vo = vo;
	}
	
	@Override
	public IScheduleQueueApplication<QueueEmailMessageVO> getApplication() {
		return InstanceFactory.getInstance(QueueEmailMessageApplication.class, "queueEmailMessageApplication");
	}

	@Override
	public ScheduleQueueEmailMessage delegate(QueueEmailMessageVO vo) {
		return new ScheduleQueueEmailMessage(vo);
	}

	@Override
	public QueueEmailMessageVO getDelegateSource() {
		return vo;
	}
}
